package com.example.cardrotatemenu;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import Menu.CardRotateMenu;

public class MainActivity extends AppCompatActivity {

    private CardRotateMenu cardRotateMenu;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        cardRotateMenu=(CardRotateMenu)findViewById(R.id.cardRotateMenu);
        cardRotateMenu.setCardRotateMenuListener(new CardRotateMenu.CardRotateMenuListener() {
            @Override
            public void MenuIconClick(View v) {
                if((v.getTag()).equals("1")){
                    Toast.makeText(MainActivity.this,"1",Toast.LENGTH_SHORT).show();
                }else if((v.getTag()).equals("2")){
                    Toast.makeText(MainActivity.this,"2",Toast.LENGTH_SHORT).show();
                }else if((v.getTag()).equals("3")){
                    Toast.makeText(MainActivity.this,"3",Toast.LENGTH_SHORT).show();
                }else if((v.getTag()).equals("4")){
                    Toast.makeText(MainActivity.this,"4",Toast.LENGTH_SHORT).show();
                }
            }
        });
    }
}
